#ifndef __COSTMAP_PUBLISHER_H__
#define __COSTMAP_PUBLISHER_H__

#include <ros/ros.h>
#include <nav_msgs/OccupancyGrid.h>
#include "perception/costmap_2d/common/costmap_2d.h"

namespace costmap_2d{

class Costmap2DPublisher{
    public:
        Costmap2DPublisher(Costmap2D* costmap, std::string global_frame, std::string topic_name);

        void getOccupancyGrid(nav_msgs::OccupancyGrid& grid);
        void publishCostmap();

    private:
        ros::NodeHandle nh_;
        ros::Publisher costmap_pub_;

        Costmap2D* costmap_2d_;
        char* cost_translation_table_;
        std::string global_frame_;
        std::string topic_name_;
};

} // namespace costmap_2d

#endif